function dolink(url){
	window.location.href= url;
}


// 支付
function wechatPay(imoney,i){
		var payurl = $('#payurl',top.window.document).val();
		paylink = 'http://'+payurl+'/pay/pay.php?param='+getCookie('reid')+'&fee='+imoney+'&t='+new Date().getTime();
		window.parent.location.href = paylink;
        return;

}

function getQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return unescape(r[2]);
    return '';
}


/*设置cookie函数*/
function setCookie(name, value, day) {
    var exp = new Date();
    exp.setTime(exp.getTime() + day * 24 * 60 * 60 * 1000);
    document.cookie = name + "= " + escape(value) + ";expires= " + exp.toGMTString() + ';path=/;';
}
/*得到cookie函数*/
function getCookie(objName) {
    var arrStr = document.cookie.split("; ");
    for (var i = 0; i < arrStr.length; i++) {
        var temp = arrStr[i].split("=");
        if (temp[0] == objName)
            return unescape(temp[1])
    }
}
/*删除cookie函数*/
function delCookie(i) {
    var e = new Date;
    e.setTime(e.getTime() - 1);
    var o = getCookie(i);
    null != o && (document.cookie = i + "=" + o + ";expires=" + e.toGMTString())
}
